package com.zuo.entity;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * @Author 白白旧维
 * @Date 2022/2/28 18:33
 */
public class Pos {

    private int pid;
    private String pname;
    private String pdetail;
    private List<Staff> staffList;

    public Pos() {
        this.staffList = new ArrayList<>();
    }

    public Pos(int pid, String pname, String pdetail, List<Staff> staffList) {
        this.pid = pid;
        this.pname = pname;
        this.pdetail = pdetail;
        this.staffList = staffList;
    }

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public String getPdetail() {
        return pdetail;
    }

    public void setPdetail(String pdetail) {
        this.pdetail = pdetail;
    }

    public List<Staff> getStaffList() {
        return staffList;
    }

    public void setStaffList(List<Staff> staffList) {
        this.staffList = staffList;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Pos pos = (Pos) o;
        return pid == pos.pid &&
                Objects.equals(pname, pos.pname) &&
                Objects.equals(pdetail, pos.pdetail) &&
                Objects.equals(staffList, pos.staffList);
    }

    @Override
    public int hashCode() {
        return Objects.hash(pid, pname, pdetail, staffList);
    }

    @Override
    public String toString() {
        return "Position{" +
                "pid=" + pid +
                ", pname='" + pname + '\'' +
                ", pdetail='" + pdetail + '\'' +
                ", staffList=" + staffList +
                '}';
    }
}
